package com.ldatum.crm.serviceImpl;

import java.sql.SQLException;
import java.util.List;

import com.ldatum.crm.dao.AnnouncementDao;
import com.ldatum.crm.daoImpl.AnnouncementDaoImpl;
import com.ldatum.crm.domain.Announcement;
import com.ldatum.crm.service.AnnouncementService;

public class AnnouncementServiceImpl implements AnnouncementService {
	AnnouncementDao announcementDao = new AnnouncementDaoImpl();

	@Override
	public List<Announcement> findTop10() throws Exception {
		return announcementDao.findTop10();
	}

	@Override
	public int save(Announcement announcement) {
		return announcementDao.save(announcement);
	}

	@Override
	public List<Announcement> list() {
		return announcementDao.list();
	}

	@Override
	public Announcement findById(int id) throws SQLException {
		return announcementDao.findById(id);
	}

}
